package com.xian.yoga.entity;

import java.util.ArrayList;
import java.util.List;

public class UsersExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public UsersExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andUsersIdIsNull() {
            addCriterion("users_id is null");
            return (Criteria) this;
        }

        public Criteria andUsersIdIsNotNull() {
            addCriterion("users_id is not null");
            return (Criteria) this;
        }

        public Criteria andUsersIdEqualTo(Integer value) {
            addCriterion("users_id =", value, "usersId");
            return (Criteria) this;
        }

        public Criteria andUsersIdNotEqualTo(Integer value) {
            addCriterion("users_id <>", value, "usersId");
            return (Criteria) this;
        }

        public Criteria andUsersIdGreaterThan(Integer value) {
            addCriterion("users_id >", value, "usersId");
            return (Criteria) this;
        }

        public Criteria andUsersIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("users_id >=", value, "usersId");
            return (Criteria) this;
        }

        public Criteria andUsersIdLessThan(Integer value) {
            addCriterion("users_id <", value, "usersId");
            return (Criteria) this;
        }

        public Criteria andUsersIdLessThanOrEqualTo(Integer value) {
            addCriterion("users_id <=", value, "usersId");
            return (Criteria) this;
        }

        public Criteria andUsersIdIn(List<Integer> values) {
            addCriterion("users_id in", values, "usersId");
            return (Criteria) this;
        }

        public Criteria andUsersIdNotIn(List<Integer> values) {
            addCriterion("users_id not in", values, "usersId");
            return (Criteria) this;
        }

        public Criteria andUsersIdBetween(Integer value1, Integer value2) {
            addCriterion("users_id between", value1, value2, "usersId");
            return (Criteria) this;
        }

        public Criteria andUsersIdNotBetween(Integer value1, Integer value2) {
            addCriterion("users_id not between", value1, value2, "usersId");
            return (Criteria) this;
        }

        public Criteria andUsersNameIsNull() {
            addCriterion("users_name is null");
            return (Criteria) this;
        }

        public Criteria andUsersNameIsNotNull() {
            addCriterion("users_name is not null");
            return (Criteria) this;
        }

        public Criteria andUsersNameEqualTo(String value) {
            addCriterion("users_name =", value, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameNotEqualTo(String value) {
            addCriterion("users_name <>", value, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameGreaterThan(String value) {
            addCriterion("users_name >", value, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameGreaterThanOrEqualTo(String value) {
            addCriterion("users_name >=", value, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameLessThan(String value) {
            addCriterion("users_name <", value, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameLessThanOrEqualTo(String value) {
            addCriterion("users_name <=", value, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameLike(String value) {
            addCriterion("users_name like", value, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameNotLike(String value) {
            addCriterion("users_name not like", value, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameIn(List<String> values) {
            addCriterion("users_name in", values, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameNotIn(List<String> values) {
            addCriterion("users_name not in", values, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameBetween(String value1, String value2) {
            addCriterion("users_name between", value1, value2, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersNameNotBetween(String value1, String value2) {
            addCriterion("users_name not between", value1, value2, "usersName");
            return (Criteria) this;
        }

        public Criteria andUsersPwdIsNull() {
            addCriterion("users_pwd is null");
            return (Criteria) this;
        }

        public Criteria andUsersPwdIsNotNull() {
            addCriterion("users_pwd is not null");
            return (Criteria) this;
        }

        public Criteria andUsersPwdEqualTo(String value) {
            addCriterion("users_pwd =", value, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdNotEqualTo(String value) {
            addCriterion("users_pwd <>", value, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdGreaterThan(String value) {
            addCriterion("users_pwd >", value, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdGreaterThanOrEqualTo(String value) {
            addCriterion("users_pwd >=", value, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdLessThan(String value) {
            addCriterion("users_pwd <", value, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdLessThanOrEqualTo(String value) {
            addCriterion("users_pwd <=", value, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdLike(String value) {
            addCriterion("users_pwd like", value, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdNotLike(String value) {
            addCriterion("users_pwd not like", value, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdIn(List<String> values) {
            addCriterion("users_pwd in", values, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdNotIn(List<String> values) {
            addCriterion("users_pwd not in", values, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdBetween(String value1, String value2) {
            addCriterion("users_pwd between", value1, value2, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersPwdNotBetween(String value1, String value2) {
            addCriterion("users_pwd not between", value1, value2, "usersPwd");
            return (Criteria) this;
        }

        public Criteria andUsersRoleIsNull() {
            addCriterion("users_role is null");
            return (Criteria) this;
        }

        public Criteria andUsersRoleIsNotNull() {
            addCriterion("users_role is not null");
            return (Criteria) this;
        }

        public Criteria andUsersRoleEqualTo(String value) {
            addCriterion("users_role =", value, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleNotEqualTo(String value) {
            addCriterion("users_role <>", value, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleGreaterThan(String value) {
            addCriterion("users_role >", value, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleGreaterThanOrEqualTo(String value) {
            addCriterion("users_role >=", value, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleLessThan(String value) {
            addCriterion("users_role <", value, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleLessThanOrEqualTo(String value) {
            addCriterion("users_role <=", value, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleLike(String value) {
            addCriterion("users_role like", value, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleNotLike(String value) {
            addCriterion("users_role not like", value, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleIn(List<String> values) {
            addCriterion("users_role in", values, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleNotIn(List<String> values) {
            addCriterion("users_role not in", values, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleBetween(String value1, String value2) {
            addCriterion("users_role between", value1, value2, "usersRole");
            return (Criteria) this;
        }

        public Criteria andUsersRoleNotBetween(String value1, String value2) {
            addCriterion("users_role not between", value1, value2, "usersRole");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}